package com.example.config;

import net.rubyeye.xmemcached.MemcachedClient;
import net.rubyeye.xmemcached.MemcachedClientBuilder;
import net.rubyeye.xmemcached.XMemcachedClientBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.io.IOException;


@Configuration
public class Xmemcached {

    @Bean
  public MemcachedClient getClient() throws IOException {
        MemcachedClientBuilder mcachedClient = new XMemcachedClientBuilder("localhost:11211");
        MemcachedClient memcachedClient = mcachedClient.build() ;
        return memcachedClient;
  }
}